<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="st" uri="http://www.springframework.org/tags" %>
 
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<!-- start: Meta -->
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>扑通,做标准化火锅</title>
	<meta name="description" content="扑通,标准化火锅">
	<meta name="keyword" content="扑通,标准化火锅">
<c:set var="ctx" value="" />
 <script src="${ctx}/static/js/jquery-1.9.1.min.js"></script>
 <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	
</head>
<body class="wallpaper">
 <form id="form1" class="form" action="/web/formview/571b423b0cf22cbbdb1ed720" method="post">
 输入地址<br>
<input type="text" id="address" name="address" maxlength="200">
 
<br>  输入金额<br>
<input type="text" id="address" name="address" value="1"><br>  <br>  <br>  
	<button type="button" class="btn btn-default"
								onClick="payment()">点我付钱</button>
</form>
	 <script>
	 function onBridgeReady(){
		   WeixinJSBridge.invoke(
		     'getBrandWCPayRequest', {
		       "appId" : "wx2421b1c4370ec43b",	 //公众号名称，由商户传入	 
		       "timeStamp":" 1395712654",		 //时间戳，自1970年以来的秒数	 
		       "nonceStr" : "e61463f8efa94090b1f366cccfbbb444", //随机串	 
		       "package" : "u802345jgfjsdfgsdg888",	 
		       "signType" : "MD5",		 //微信签名方式:	 
		       "paySign" : "70EA570631E4BB79628FBCA90534C63FF7FADD89" //微信签名 
		     },
		     function(res){	 
		       if(res.err_msg == "get_brand_wcpay_request:ok" ) {}	 // 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回	ok，但并不保证它绝对可靠。 
		     }
		   ); 
		}
		if (typeof WeixinJSBridge == "undefined"){
		   if( document.addEventListener ){
		     document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
		   }else if (document.attachEvent){
		     document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
		     document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
		   }
		}else{
		   onBridgeReady();
		}
	 </script>
</body>
</html>